package com.cswangdao.mapper;

import com.cswangdao.domain.model.MarketGoodsSpecification;
import com.cswangdao.domain.po.GoodsSpecification;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MarketGoodsSpecificationMapper {

    /**
     * @description: 批量插入商品规格信息
     * @param: specifications
     * @return: void
     */
    void insertBatch(List<GoodsSpecification> specifications);

    @Delete("delete from market_goods_specification where goods_id = #{goodsId} ")
    void deleteById(Integer goodsId);

    List<MarketGoodsSpecification> getByGoodsId(@Param("goodsId") int goodsId);

    void updateById(GoodsSpecification goodsSpecification);
}